databaseChangeLog:
  - changeSet:
      id: 3
      author: putilin
      context: test
      changes:
        - createTable:
            tableName: users
            columns:
              - column:
                  name: id
                  type: BIGINT
                  autoIncrement: true
                  constraints:
                    primaryKey: true
                    nullable: false
              - column:
                  name: email
                  type: varchar(30)
              - column:
                  name: password
                  type: varchar(255)
              - column:
                  name: role
                  type: varchar(30)

        - createTable:
            tableName: tokens
            columns:
              - column:
                  name: id
                  type: BIGINT
                  autoIncrement: true
                  constraints:
                    primaryKey: true
              - column:
                  name: tokens
                  type: varchar
              - column:
                  name: user_id
                  type: BIGINT
                  constraints:
                    foreignKeyName: user_id
                    referencedTableName: users
                    referencedColumnNames: id

        - createTable:
            tableName: files
            columns:
              - column:
                  name: id
                  type: BIGINT
                  autoIncrement: true
                  constraints:
                    primaryKey: true
              - column:
                  name: file_name
                  type: varchar(255)
              - column:
                  name: file_size
                  type: BIGINT
              - column:
                  name: type
                  type: varchar(100)
              - column:
                  name: hash
                  type: varchar
              - column:
                  name: upload_date
                  type: timestamp

